package com.sptpc.demo.vo;
import com.sptpc.demo.model.Category;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.joda.money.Money;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class DrinkWithCategoryVo {
    private Long id;
    private String name;
    private Money price;
    private Category category; //Drink * -> 1 Category
}
/** 1.sql
 *     SELECT d.id id, d.name name ,price ,tc.name category
 *     FROM t_drink d  LEFT JOIN t_category tc
 *     ON d.category_id = tc.id;
 *  2.map orm转换规则
 */
